# this will control a user's fake photo collection
# and prevent it from actually calling flickr for
# the results.
#
# As long as all the results are structured correctly,
# everything should work the same....
#
# The fake user's photo collection will look like this,
# Sets:
#   -Hawaii
#       -20 photos
#       -id 1
#       -secrete 12345
#   -Family Photos
#       -500 photos
#       -id 2
#       -secret 54321
#


import xml.etree.ElementTree as ElementTree


number_of_photosets = 3

def photosets_getList(*args, **kwargs):
    
    
    return ElementTree.fromstring("""
<photosets cancreate="1">
	<photoset id="1" primary="2483" secret="abcdef"
		server="8" photos="4" farm="1">
		<title>Test</title>
		<description>foo</description>
	</photoset>
	<photoset id="4" primary="1234" secret="832659"
		server="3" photos="12" farm="1">
		<title>My Set</title>
		<description>bar</description>
	</photoset>
</photosets>""")
    
def photos_recentlyUpdated(*args, **kwargs):
    return ElementTree.fromstring("""
<photos page="1" pages="1" perpage="100" total="2">
        <photo id="169885459" owner="35034348999@N01" 
               secret="c85114c195" server="46" title="Doubting Michael"
               ispublic="1" isfriend="0" isfamily="0" lastupdate="1150755888" />
        <photo id="85022332" owner="35034348999@N01"
               secret="23de6de0c0" server="41"
               title="&quot;Do you think we're allowed to tape stuff to the walls?&quot;"
               ispublic="1" isfriend="0" isfamily="0" lastupdate="1150564974" />
</photos>""")
    
def auth_checkToken(*args, **kwargs):
    return ElementTree.fromstring("""
<auth>
	<token>976598454353455</token>
	<perms>read</perms>
	<user nsid="12037949754@N01" username="Bees" fullname="Cal H" />
</auth>""")

def auth_getFrob(*args, **kwargs):
    return ElementTree.fromstring("""<frob>746563215463214621</frob>""")

def auth_getToken(*args, **kwargs):
    return ElementTree.fromstring("""
<auth>
	<token>976598454353455</token>
	<perms>write</perms>
	<user nsid="12037949754@N01" username="Bees" fullname="Cal H" />
</auth>""")

def photosets_getPhotos(*args, **kwargs):
    return ElementTree.fromstring("""
<photoset id="4" primary="2483" page="1" perpage="500" pages="1" total="2">
	<photo id="2484" secret="123456" server="1"
		title="my photo" isprimary="0" /> 
	<photo id="2483" secret="123456" server="1"
		title="flickr rocks" isprimary="1" /> 
</photoset>""")